ibutes are just in a table entry of the argument node t ( t.at ):
>
> set up a lua function in the setups:
>
> \startxmlsetups xml:demo:base
> \xmlsetsetup{#1}{*}{xml:demo:*}
> \xmlsetfunction {\xmldocument}{entry}{userdata.xmlfunctions.entry}
> \stopxmlsetups
>
> and then add this lua
lso be great!)
Not CALS, but I do a lot of HTML table processing. I find it all much easier on
the lua side, because there the
attributes are just in a table entry of the argument node t ( t.at ):
set up a lua function in the setups:
\startxmlsetups xml:demo:base
\xmlsetsetup{#1
nction xml.functions.b(t)
context.start()
context.bf()
lxml.flush(t)
context.stop()
context("{}")
end
function xml.functions.section(t)
context.section("{")
lxml.flush(t)
context("}")
end
\stopluacode
\startxmlsetups mysetups % to be co
which displays fine in my
browser, and it should look similar with ConTeXt.
I have problems with literal typesetting ofspan class=... (that
should have applied style instead), but maybe I only have wrong
settings in my parser.
When I use \xmlsetfunction{main}{pre}{lxml.displayverbatim}, then I
, and it should look similar with ConTeXt.
I have problems with literal typesetting of span class=... (that
should have applied style instead), but maybe I only have wrong
settings in my parser.
When I use \xmlsetfunction{main}{pre}{lxml.displayverbatim}, then I
cannot color the numbers. When I use
in docbook they embed the cals
model, so it's not used as an independent definition).
When in x-cals.lua the following is used in line 128
local prefix = namespace and namespace ~= and (namespace .. :)
or
one can do this then:
\startxmlsetups xml:cals:nonamespace
\xmlsetfunction
can anly compile it with texexec --lua filename.tex.
Mojca
\startxmlsetups all:html
\xmlsetsetup{main}{head|h1|h2|p|span|sub|table|b|tt|ul|li|div|img}{*}
%\xmlsetfunction{main}{pre}{lxml.displayverbatim}
%\xmlsetfunction{main}{verb}{lxml.inlineverbatim}
\stopxmlsetups
? With \ignorespaces?
- How to use the new verbatim code? I have tried to use
\xmlsetfunction{main}{pre}{lxml.verbatim}
but it didn't really work.
% test.tex:
\startxmlsetups all:html
\xmlsetsetup{main}{h1|pre}{*}
\stopxmlsetups
\xmlregistersetup{all:html}
% is this the proper way